﻿using BaiTu.IEventServices;
using BaiTu.IOCServices;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace BaiTu.Framework.Infrastructure.MVC.MvcControllers
{
    public abstract class BaseController : Controller
    {
        private IEventBus evtBus;

        /// <summary>
        /// 事件总线
        /// </summary>
        protected IEventBus EventBus
        {
            get
            {
                if (evtBus == null)
                    evtBus =EngineContext.Current.Resolve<IEventBus>();

                return evtBus;
            }
        }
    }
}
